package com.ruoyi.controller.open;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.dto.DownloadVideoDTO;
import com.ruoyi.hkCamera.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/open")
public class OpenController extends BaseController {

    @Autowired
    private VideoService videoService;

    @PostMapping("/downloadVideo")
    public AjaxResult downloadVideo(@RequestBody DownloadVideoDTO dto) {
        videoService.downloadVideo(dto);
        return success();
    }
}
